<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container">
        <div class="col-md-offset-1 col-md-10">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h5>分类LOGO</h5>
                </div>
                <div class="panel-body">
                    <form action="{:U('Logo/edit')}" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <div>
                                <img src="./<?php echo $data['logo']?>" width="100px" height="50px;" alt="">
                            </div>
                            <label for="logo">修改LOGO:</label>
                            <input type="file" name="logo" class="">
                        </div>
                        <div class="form-group">
                            <label for="id">选择分类:</label>
                            <select name="ids" class="form-control">
                                <option value="0">请选择分类:</option>
                                <?php foreach($items as $item):
                                    if($item['id'] == $data['id']) {
                                       	$select = 'selected="selected"';
                                    } else {
                                        $select = '';
                                    }
                                ?>
                                <option <?php echo $select?> value="<?php echo $item['id']?>"><?php echo str_repeat('-', 6*$item['level']) . $item['name']; ?></option>
                                <?php endforeach;?>
                            </select>
                        </div>
                        <input type="hidden" name="id" value="<?php echo $data['id']?>">
                        <button type="submit" class="btn btn-primary btn-sm">修改</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</body>
</html>